Vmware 中 Kali linux 2020 设置共享文件夹

您所在的位置:网站首页 vmware mac 共享文件夹 Vmware 中 Kali linux 2020 设置共享文件夹

Vmware 中 Kali linux 2020 设置共享文件夹

2024-07-05 13:27| 来源: 网络整理| 查看: 265

前言

kali2020已经自带vmware-tools工具,因此,只要是原装的kali2020是不需要继续安装vmhgfs工具的。

过程

vmware 设置共享目录

使用vmware-hgfsclient命令查看共享的文件夹

root@kali:/mnt/hgfs# vmware-hgfsclient share 显示我的共享文件夹是kali_share

使用vmhgfs-fuse命令挂载共享文件夹

root@kali:~# vmhgfs-fuse .host:/share /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

如果没有其他显示报错,就可以认为挂载成功了。

注意:我的/mnt文件夹下的hgfs是自己创建的,如果没有,可以用mkdir /mnt/hgfs命令创建。

查看是否挂载成功

直接用ls命令查看 root@kali:/# ls /mnt/hgfs 1.txt

显示挂载的共享文件已经有我在win10放入的1.txt,表示成功挂载。

直接把挂载放入启动文件

首先,备份/etc/fstab文件 root@kali:/etc# cp fstab fstab_bak 其次,编辑fstab root@kali:/etc# vim fstab 在最后一句添加 # mount hgfs .host:/share /mnt/hgfs fuse.vmhgfs-fuse allow_other 0 0 然后就能够不用每次重启挂载一遍。 可能报错 错误提示 显示挂载成功了,但是ls共享文件夹报错(No such file or directory)

root@kali:~# vmhgfs-fuse .host:/share/kali_share /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other root@kali:~# ls /mnt/hgfs/ ls: cannot access '/mnt/hgfs/': No such file or directory

这个雷其实是自己不注意命令内容,不是挂载的/share/kali_share 而是一定要跟vmware-hgfsclient一样。因此,正确命令是:

root@kali:~# vmhgfs-fuse .host:/kali_share /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other

fuse: bad mount point,显示挂载错误

root@kali:~# vmhgfs-fuse .host:/kali_share /mnt/hgfs -o subtype=vmhgfs-fuse,allow_other fuse: bad mount point `/mnt/hgfs': No such file or directory

参考解决

一、先查挂载命令没有错;二、再查共享文件hgfs有没有建;

三、如果上面都没有错误的话,查使用mount命令查看,是不是之前已经把hgfs挂载了

root@kali:/mnt# mount vmhgfs-fuse on /mnt/hgfs type fuse.vmhgfs-fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other) 如果显示和上面一样,就是之前已经挂载了,但是没有挂载成功,需要先用umount卸载挂载

root@kali:/mnt# umount /mnt/hgfs 再重新用mount挂载命令查看,没有vmhgfs-fuse,则表示成功卸载挂载,再重新执行正确的挂载命令。

参考博文:https://blog.csdn.net/hcu5555/article/details/107182222/



【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3